﻿package {	import flash.media.Sound	import flash.media.SoundTransform	import flash.media.SoundChannel	public class SoundManager{		private static var _x:Number = 0;		private static var _y:Number = 0;				public static var muted:Boolean = false				public static function Move(x:Number, y:Number){			_x = x;			_y = y;					}						public static function Play( sound:Sound, x:Number, y:Number ){			if(muted) return						var ox:Number = x-_x			var oy:Number = y-_y						var dist:Number = Math.sqrt(ox*ox+oy*oy)						var transform:SoundTransform = new SoundTransform( Math.max(2000-dist,0)/1000   );            var channel:SoundChannel = sound.play();            channel.soundTransform = transform;					}	}	}